home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / FDF101.ARJ / FDFCOMM.H < prev    next >
C/C++ Source or Header  |  1992-04-29  |  3KB  |  94 lines

  1. /*
  2.  * fdfcomm.h
  3.  *
  4.  * common functions for find duplicates.
  5.  *
  6.  * Roy Bixler
  7.  * March 23, 1991
  8.  *
  9.  * This program is free software; you can redistribute it and/or modify
  10.  * it under the terms of the GNU General Public License as published by
  11.  * the Free Software Foundation; either version 1, or (at your option)
  12.  * any later version.
  13.  *
  14.  * This program is distributed in the hope that it will be useful,
  15.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  17.  * GNU General Public License for more details.
  18.  *
  19.  * You should have received a copy of the GNU General Public License
  20.  * along with this program; if not, write to the Free Software
  21.  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  22.  */
  23.  
  24.  
  25.  
  26. #define ADD_TO_PATH        "*.*"
  27. #define MAX_STR            80
  28. #define N_INTERACTIVE    20    /* maximum number of interactive delete menu */
  29.                             /* entries */
  30.  
  31. /*
  32.  * file matching criteria
  33.  */
  34. #define CONTENTS_MATCH    0x1
  35. #define TIMES_MATCH        0x2
  36. #define SIZES_MATCH        0x4
  37. #define NAMES_MATCH        0x8
  38. #define ALL_MATCH        (CONTENTS_MATCH|TIMES_MATCH|SIZES_MATCH|NAMES_MATCH)
  39.  
  40. /*
  41.  * file sorting criteria
  42.  */
  43. #define TIME_SORT        0x1
  44. #define SIZE_SORT        0x2
  45. #define NAME_SORT        0x4
  46.  
  47. /*
  48.  * file sort order
  49.  */
  50. #define ASCENDING        0x0
  51. #define DESCENDING        0x1
  52.  
  53.  
  54.  
  55. typedef struct file_list {
  56.     struct ffblk dta;
  57.     char *path;
  58.     char added;
  59.     char printed;
  60.     struct file_list *next;
  61. } FILE_LIST;
  62.  
  63.  
  64.  
  65. extern FILE_LIST *F_list;
  66. extern char Match_criteria, Sort_criteria, Sort_order;
  67. extern char i_flag;    /* interactive delete mode */
  68. extern char l_flag;    /* long listing? */
  69. extern char v_flag;    /* verbose? */
  70.  
  71.  
  72.  
  73. /* fdfcomm.c */
  74. void print_fdate(struct ffblk *dta);
  75. void print_ftime(struct ffblk *dta);
  76. void print_fdatetime(struct ffblk *dta);
  77. void print_fpath(char *path, char *f_name);
  78. void long_listing(char *path, struct ffblk *dta);
  79. void print_match_header(FILE_LIST *start);
  80. void print_next_match(FILE_LIST *next, int menu_num);
  81. void print_id_menu(FILE_LIST **menu, int num_items);
  82. int cmpflist(FILE_LIST *fd, char *path, struct ffblk *dta);
  83. int cmpflist_eq(FILE_LIST *fd1, FILE_LIST *fd2);
  84. int files_match(FILE_LIST *file1, FILE_LIST *file2);
  85. void gen_list(char *path);
  86. void add_file_to_list(char *path, struct ffblk *dta);
  87. void gen_list_of_dir(char *path, char *subdir);
  88. void list_files(char *prog_name, char *path, char sorted);
  89. void print_flist(FILE_LIST *flist);
  90. int compare_path_name_files(char *path1, char *name1, char *path2, char *name2);
  91. int delete_path_name_file(char *path, char *f_name, char force);
  92. void get_cur_path(char *new, char *target_dir);
  93. void change_disk(char *dir, char *cur_dir);
  94.